/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Test;

import Transformers.Wavelets.HaarWavelet;

/**
 *
 * @author BeerBrewer
 */
public class TestCaseHaarWavelet {

    public static void main(String[] args){
//        HaarWavelet test1 = new HaarWavelet();
//        double[] testArray = new double[]{8,4,1,3,5,6};
//        double[] decomposed = test1.transform(testArray, null);
//        test1.print(testArray);
//        test1.print(decomposed);

        HaarWavelet test2 = new HaarWavelet();
        double[][] testArray = new double[4][4];
        testArray[0][0] = 9;
        testArray[0][1] = 7;
        testArray[0][2] = 3;
        testArray[0][3] = 5;
        testArray[1][0] = 8;
        testArray[1][1] = 4;
        testArray[1][2] = 1;
        testArray[1][3] = 3;
        testArray[2][0] = 5;
        testArray[2][1] = 7;
        testArray[2][2] = 2;
        testArray[2][3] = 1;
        testArray[3][0] = 3;
        testArray[3][1] = 6;
        testArray[3][2] = 5;
        testArray[3][3] = 2;

        test2.print(testArray);
        System.out.println("-----------------------");
        for (int i=0; i<testArray.length;i++){
            double[] transformed = test2.transform(testArray[i], null);
            test2.print(transformed);
        }

        System.out.println("-----------------------");
        double[] array1 = new double[]{6, 4, 3.75, 4};
        double[] array2 = new double[]{2, 2, 2.25, 0.5};
        double[] array3 = new double[]{1, 2, 1, 1.5};
        double[] array4 = new double[]{1, 1, 0.5, 1.5};
        test2.print(test2.transform(array1, null));
        test2.print(test2.transform(array2, null));
        test2.print(test2.transform(array3, null));
        test2.print(test2.transform(array4, null));

        System.out.println("-----------------------");

        double[][] transformed = test2.transform(testArray);
        test2.print(transformed);

//        HaarWavelet test0 = new HaarWavelet();
//        double[][] printArray = new double[3][3];
//        printArray[0][0]=1;
//        printArray[1][0]=4;
//        printArray[2][0]=7;
//        printArray[0][1]=2;
//        printArray[1][1]=5;
//        printArray[2][1]=8;
//        printArray[0][2]=3;
//        printArray[1][2]=6;
//        printArray[2][2]=9;
//        test0.print(printArray);
    }
}
